{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from dataloder.scoliosis_dataloder import ScoliosisDataset\n",
    "from dataloder.facial_attraction_dataloder import FacialAttractionDataset\n",
    "from dataloder.fa_and_sco_dataloder import ScoandFaDataset\n",
    "from dataloder.scofaNshot_dataloder import ScoandFaNshotDataset\n",
    "from dataloder.age_dataloder import MegaAsiaAgeDataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def load_dataset(data_config):\n",
    "    if data_config.dataset == \"cifar10\":\n",
    "        training_transform = training_transforms()\n",
    "        if data_config.autoaug:\n",
    "            print(\"auto Augmentation the data !\")\n",
    "            training_transform.transforms.insert(0, Augmentation(fa_reduced_cifar10()))\n",
    "        train_dataset = torchvision.datasets.CIFAR10(\n",
    "            root=data_config.data_path,\n",
    "            train=True,\n",
    "            transform=training_transform,\n",
    "            download=True,\n",
    "        )\n",
    "        val_dataset = torchvision.datasets.CIFAR10(\n",
    "            root=data_config.data_path,\n",
    "            train=False,\n",
    "            transform=validation_transforms(),\n",
    "            download=True,\n",
    "        )\n",
    "        return train_dataset, val_dataset\n",
    "    elif data_config.dataset == \"cifar100\":\n",
    "        train_dataset = torchvision.datasets.CIFAR100(\n",
    "            root=data_config.data_path,\n",
    "            train=True,\n",
    "            transform=training_transforms(),\n",
    "            download=True,\n",
    "        )\n",
    "        val_dataset = torchvision.datasets.CIFAR100(\n",
    "            root=data_config.data_path,\n",
    "            train=False,\n",
    "            transform=validation_transforms(),\n",
    "            download=True,\n",
    "        )\n",
    "        return train_dataset, val_dataset"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
